package com.arpa.wms.domain.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;

import java.util.List;

/**
 * <p>
 * 仓库
 * </p>
 *
 * @author LEO
 * @since 2020-08-03
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@ApiModel(value="Warehouse对象", description="仓库")
@TableName("wms_warehouse")
public class Warehouse extends BasicEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "数据标识")
    @TableField("code")
    private String code;

    @ApiModelProperty(value = "仓库名称")
    @TableField("name")
    @Length(max = 100, message = "仓库名称长度不能大于100个字符", groups = {Save.class, Update.class})
    private String name;

    @ApiModelProperty(value = "仓库代码")
    @TableField("serial_number")
    @Length(max = 100, message = "仓库名称长度不能大于100个字符", groups = {Save.class, Update.class})
    private String serialNumber;

    @ApiModelProperty(value = "所属组织")
    @TableField("group_code")
    private String groupCode;

    @ApiModelProperty(value = "仓库类型")
    @TableField("type")
    private String type;

    @ApiModelProperty(value = "启用库位管理:0不启用，1启用")
    @TableField(value = "location_management")
    private Integer locationManagement;

    @ApiModelProperty(value = "经度")
    @TableField("longitude")
    private String longitude;

    @ApiModelProperty(value = "维度")
    @TableField("latitude")
    private String latitude;

    @ApiModelProperty(value = "联系人")
    @TableField("contacts")
    @Length(max = 100, message = "联系人长度不能大于100个字符", groups = {Save.class, Update.class})
    private String contacts;

    @ApiModelProperty(value = "座机号码")
    @TableField("landline_number")
    @Length(max = 100, message = "座机号码长度不能大于100个字符", groups = {Save.class, Update.class})
    private String landlineNumber;

    @ApiModelProperty(value = "手机号码")
    @TableField("phone_number")
    @Length(max = 100, message = "手机号码长度不能大于100个字符", groups = {Save.class, Update.class})
    private String phoneNumber;

    @ApiModelProperty(value = "传真")
    @TableField("fax")
    @Length(max = 100, message = "传真长度不能大于100个字符", groups = {Save.class, Update.class})
    private String fax;

    @ApiModelProperty(value = "邮箱")
    @TableField("email")
    @Length(max = 100, message = "邮箱长度不能大于100个字符", groups = {Save.class, Update.class})
    private String email;

    @ApiModelProperty(value = "国家")
    @TableField("country")
    private String country;

    @ApiModelProperty(value = "省")
    @TableField("province")
    private String province;

    @ApiModelProperty(value = "市")
    @TableField("city")
    private String city;

    @ApiModelProperty(value = "县/区")
    @TableField("county")
    private String county;

    @ApiModelProperty(value = "地址")
    @TableField("address")
    @Length(max = 500, message = "地址长度不能大于500个字符", groups = {Save.class, Update.class})
    private String address;

    @ApiModelProperty(value = "备注")
    @TableField("remarks")
    @Length(max = 500, message = "备注长度不能大于500个字符", groups = {Save.class, Update.class})
    private String remarks;

    @ApiModelProperty(value = "状态：0启用、1停用")
    @TableField("status")
    private String status;


    @ApiModelProperty(value = "区域信息")
    @TableField(exist = false)
    private List<String> areaList;

    @ApiModelProperty(value = "区域信息")
    @TableField(exist = false)
    private String area;

    @ApiModelProperty(value = "是否可删除操作 0-不可删除 1-可删除")
    @TableField("delete_flag")
    private String deleteFlag;

    public interface Save {

    }

    public interface Update {

    }

}
